package com.xykj.enterprise.wechat.ext.api.externalcontact;

import com.xykj.enterprise.wechat.ext.service.customer.ExternalContactService;
import com.ydn.appserver.Action;
import com.ydn.appserver.Request;
import com.ydn.appserver.Response;
import com.ydn.appserver.annotations.Function;
import com.ydn.appserver.annotations.Parameter;
import com.ydn.appserver.annotations.Type;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Slf4j
@Function(description = "配置客户联系「联系我」方式", parameters = {
        @Parameter(name = "access_token", type = Type.String, description = "access_token", required = true),

        @Parameter(name = "type", type = Type.Integer, description = "联系方式类型,1-单人, 2-多人", required = true),
        @Parameter(name = "scene", type = Type.Integer, description = "场景，1-在小程序中联系，2-通过二维码联系", required = true),
        @Parameter(name = "style", type = Type.Integer, description = "在小程序中联系时使用的控件样式。", required = false),
        @Parameter(name = "remark", type = Type.String, description = "联系方式的备注信息，用于助记，不超过30个字符", required = false),
        @Parameter(name = "skip_verify", type = Type.Boolean, description = "外部客户添加时是否无需验证，默认为true", required = false),
        @Parameter(name = "state", type = Type.String, description = "企业自定义的state参数，用于区分不同的添加渠道，在调用“获取外部联系人详情”时会返回该参数值，不超过30个字符", required = false),
        @Parameter(name = "user", type = Type.String, description = "使用该联系方式的用户userID列表，在type为1时为必填，且只能有一个", required = false),
        @Parameter(name = "party", type = Type.String, description = "使用该联系方式的部门id列表，只在type为2时有效", required = false),
        @Parameter(name = "is_temp", type = Type.Boolean, description = "是否临时会话模式，true表示使用临时会话模式，默认为false", required = false),
        @Parameter(name = "expires_in", type = Type.Integer, description = "临时会话二维码有效期，以秒为单位。该参数仅在is_temp为true时有效，默认7天", required = false),
        @Parameter(name = "chat_expires_in", type = Type.Integer, description = "临时会话有效期，以秒为单位。该参数仅在is_temp为true时有效，默认为添加好友后24小时", required = false),
        @Parameter(name = "unionid", type = Type.String, description = "可进行临时会话的客户unionid，该参数仅在is_temp为true时有效，如不指定则不进行限制", required = false),
        @Parameter(name = "conclusions", type = Type.String, description = "结束语，会话结束时自动发送给客户，可参考“结束语定义”，仅在is_temp为true时有效", required = false),
})
@Component
public class AddContactWay implements Action {

    @Autowired
    private ExternalContactService externalContactService;

    @Override
    public Response execute(Request request) throws Exception {

        return null;
    }
}
